﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TempestChessComputer
{
    class Move
    {        
        public Move(int pieceId, int x, int y, int value = 0, bool isEnPassant = false)
        {
            PieceId = pieceId;
            TargetX = x;
            TargetY = y;
            Value = value;
            IsEnpassant = isEnPassant;
        }
        
        public int PieceId
        {
            get;
            set;
        }

        public int TargetX
        {
            get;
            set;
        }

        public int TargetY
        {
            get;
            set;
        }

        public double Value
        {
            get;
            set;
        }

        public bool IsEnpassant
        {
            get;
            set;
        }

        public int CompareTo(Move m)
        {
            return m.Value.CompareTo(this.Value);
        }

        public bool Equals(Move m)
        {
            return (this.TargetX == m.TargetX && this.TargetY == m.TargetY);
        }
    }
}
